﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace OL.FrameCore.Application.User.Dto
{
    public class GetUserRoleResponse
    {
        public int Id { get; set; }
        public List<UserRoleModel> UserRoles { get; set; }
        public string UserRolesJsonText
        {
            get
            {
                if (UserRoles == null)
                    return "[]";
                else
                    return JsonConvert.SerializeObject(UserRoles);
            }
        }
    }

    public class UserRoleModel
    {
        public int Id { get; set; }
        public string RoleName { get; set; }
        public int ParentId { get; set; }
        //public int SortIndex { get; set; }
        /// <summary>
        /// 是否分配
        /// </summary>
        public bool IsAssign { get; set; }
    }
}
